Small fixes to input and drawing.