fixing storing of empty values