Fix a issues pointed out