fixing some bugs in check4ExcessiveResource()