remove preinitialize and postinitialize hooks