Returning in wrong place