fixed pen calc bug