fixed some more bugs