added feature from https://github.com/fogleman/Craft/pull/103