Fix for Issue 77

Fixes #77 and ads tests