Bug fix for https://bugs.launchpad.net/juniperopenstack/+bug/1344477

Please review the changes first.