Checking to see if return was causing an error