fixed bugs causing failures