Fixed result check logic