Fixed some invalidly executed checks