Fixed bug with readcommand