fixing image load and storage