Fix escape not working properly in console