Some bugs with prompt fixed