In AwayJS a return isnide a with statement does not only return from the with statement, but also from the function that calls the with statement. Workaround: Do not use return in with statement.