Canvas saveContext() doesn't save lineWidth

Below is a code where all the lines have the same width. However, if you switch the order of the method call, it works as expected. This is simple, but for more complex drawing, I require specific order of execution. Not sure if this is a bug or I’m doing something wrong. Any help will be greatly appreciated.

/*
import org.vaadin.hezamu.canvas.Canvas;

/**
 *
 * @author mhossain_c
 */
public class TestClass extends Canvas
{

    public TestClass ()
    {
        setWidth("500px");
        setHeight("500px");
        drawSomeLine();
        drawSomeMoreLine();
    }

    public void drawSomeLine()
    {
        saveContext();
        setLineWidth(1);
        setFont("14px Aerial");
        setTextBaseline("middle");

        moveTo(10, 50);
        lineTo(200, 50);

        fillText("Test", 75, 75, 10);

        moveTo(10, 100);
        lineTo(200, 100);

        stroke();

        restoreContext();
    }

    public void drawSomeMoreLine()
    {
        saveContext();

        setLineWidth(5);
        moveTo(10, 150);
        lineTo(200, 150);
        stroke();
        
        restoreContext();
    }
}

Anyone?