Fixed bugs with auto setting of rest service base path