If an accused arraigned before a court-martial makes an irregular pleading; or after a plea of guilty sets up matters inconsistent with the plea; or if it appears that the accused has entered the plea of guilty improvidently or through lack of understanding of its meaning and effect; or if the accused fails or refuses to plead; a plea of not guilty shall be entered in the record, and the court shall proceed as though he or she had pleaded not guilty.
R.I. Gen. Laws § 30-13-48