Corrected a typo in the storage function when using the locking