Common JS API: callback handler fix