Fixes incorrect condition