Fix some bugs in fabric integration.