Fix return in the wrong place