Fixed handling of |onclose|
auto-merge staging into master