Fixes baseurl handling.