Fix comparison that was being done incorrectly