Fixed small issue when storing devices. Now returns an object instead of array