Fixed more bugs.

Still got some left, but I am getting there!
Fixed more bugs.