force state update before triggering onChange

fix #41