Fixed bug, probably made a few more.