fix early return checks