Fixed rewriting the base url against hosts.