fix tons of bugs