fix code and make JSHint happy again