Fixed return logic