fixed bugs of initial commit