fixed some more bugs

fixed some more bugs