I guess you meant "< ResourceMax" here?