solve bunch of bugs