Made jslint happy (and fixed parent handling).