fixed bug with tests