more fixes to resource limiting