fix gunnarlium's patch to deal with my changes