SQL storage fix