[Fix #27] resources with nonpositive IDs have undefined urls

This resolved #27