bug fix

bug fix suggested by JSHint