fix integration bugs found