Fixes missing output due to wrong check