Fixed console to handle empty lines.