fixed bug with values not being saved properly in database~

fixed bug with values not being saved properly in database~