fix test and some other minor issues