fixed issue with filtering and will_paginate