Fix vlaues to database correctly.