improve debugging, 'on' handling was broken