fixed handleCallback and tests