fixed #168 -- also detects duplicate callbacks now