fixed bugs...hopefully