Another problem with 'parent != false'. should be 'parent !== false'.