tests and fix