Fixing recycle query