added test and fix for double notification bug.