fixes tests and lib