fixed somebugs