fixed rest of bugs