Fixed loose coupling problems found on sonar