prompt shows after error

Fixed the bug where prompt didn't show up after displaying error message