fixed bugs

fixed the previous commits' bugs.