Fix wrong check