solving visibility bugs