fixed Database error