fixed some more bugs.