add automatic patching of q module if available