Fix issues with TileEntities and isInvalid()