fixed set of bugs