added check to prevent unnecessary reload