fixed bugs
finally!!!!