makes program return error code when no gui
fix