FIX: debug does not work properly