Fixed a check for anvil initialization