Added support for base URL change + two bugfixes