Fixed a few initial bugs.