Made canvas updatable without keeping previous lines