fixing bug multiple call to store