you might wanna take a look at the if-comparison...
in the aliases you're using
if (%away = on) {
but you want
if (%away == on) {

you're version will set %away to 'on' everytime and since thats successfull, it will evaluate true and go on with the first stuff...