Fixed small issue with updating database