Improvement of empty nodes detection and tests adjustments for that