Fixing the select query within the in-bed-ification process.