fixed double drawing, input handling change