fixed some optional syntax issues for sake of JSHint