Improved detection of empty resources