Fixed some minor bugs on reading from promp