fixing on() calls
scripted update of code from master at 6b92fba fixing on() calls