Fix mismatching enumeration usage + uninitialized variables