changed bug that didn't allow db to be updated