Many more fixes related to base url.