bugs fix in test