fix for setBaseUrl cutting off the last char. Closes #338