fixed ticket.rb search functions