fixed double drawing the layer after loading it from file