fixed uri storing and retrieving