Fixed an error in a handler due to changes in db