fixed test with multiple backends
moved callback definition