Change to use the correct DB in errormessage