Sec.  19.  When  mistake  has  been  made  in  charging  the  proper offense. – When it becomes manifest at any time before judgment that a mistake has been made  in charging the proper offense and the  accused  cannot  be  convicted  of  the  offense  charged  or  any other offense necessarily included therein, the accused shall not be discharged if there appears good cause to detain him. In such case, the  court  shall  commit  the  accused  to  answer  for  the  proper offense and dismiss the original case upon the filing of the proper information.
 

WHAT IF THERE WAS A MISTAKE MADE IN CHARGING THE PROPER OFFENSE?

     When  it  becomes  manifest  at  any  time  before  judgment  that  a mistake  has  been  made  in  charging  the  proper  offense  and  the accused cannot be convicted of the offense charged or any other
offense  necessarily  included  therein,  the  accused  shall  not  be discharged if there appears good cause to detain him

     The accused shall not be discharged if there appears good cause to detain him

     In such case, the court shall commit the accused to answer for the proper offense and dismiss the original case upon the filing of the proper information.