fixed tests and issues