Local Storage error

fixed error caused by local storage NaN return value.