If the party is lawfully imprisoned or restrained and is not entitled to be discharged on giving bail, the party shall be remanded or otherwise properly committed.