Add support for quit events