fix db + entities