Fix a little bugs