Made metadata filtering work on Ruby 1.8