fixed bugs

fixed bugs that were unfixed. there are still other bugs