Fix setting non-string value to db