fix error in checking store type