Fixes a bug in RestfulRouter