exit while error in prompt mode was fixed