a little ide auto cleanup for the xquery context