updated build with requesttoclose event being raised (more) correctly