fixed store errors (changing correct variables)