fixed tons of bugs