fixed some minor bug