Fixed issue with early return not handled properly