Fixed some more bugs. One or two left.