Fixes bad use of return statements