Fixed bug in getting predicates registered with database.