Bug fixes

Do not always remove trailing slash. Some API calls require them.