Fixed condtional statement in compat