Fixed bug with printing small files

Fixed bug that caused the interface to hang when trying to print a gcode
that was less than 21 lines long