Fix a few bug