Bug fixes.
More bug fixes.
Fix jshint issue.
Merge pull request #287 from optimizely/krush/bugfixes

Bug fixes.
resolve merge conflict