Fixing q dependency issues