Store proper values in database