Added fix for text property when used with setLayer()