Fix storage calcuation bug