FIX: logic bug