adapted to commit https://github.com/BlueSpire/Durandal/commit/f92f2e88b34db1217928f92ce6b137a824c7ca0a