fix absolute url reverse bug in for building
merge refactor branch