fixed an issue in updateDisplay