Fixed crashing bug in device store