Fix syntax error
Fix checking for node existence twice