added support for an on_change handler; fixed minor bug in console warn