test and minor fixes