fixed delete_on_close