fix #588 with onchange handler