fix pen crash on vector layer