However, he convinces judge to let him out of jail, promising to behave