Fixed illogical logic