added fix from https://github.com/fogleman/Craft/pull/129