fixed ng-class problem mentioned in issue #320