Returning None in correct place