More fixes to ensure everything is initialized correctly when starting with keyboard plugged in.