Fixing crash on mainnet