bug fix with pencil init