fixed some minor bug issues