Fixed a couple of bugs...