Fixing compile when graphics is turned on