fixed storing bug and other things