fixed issue where callback was not being invoked