Sonar fixes

https://www.pivotaltracker.com/story/show/62645934