Fix auto height bug