fix bug in REST router; wtf