Fixed db exceptions.