More fixes of bugs