remove unneeded line and fix bug in context unloading