Fixed saving to DB