Minor bugfixes.
Improved resource service and port backlog to use it.