Modified code to pass jslint check.