ticket:6 fix bug with saving and retriving data