Fixed bug in REST url processing