fixing tests in both ends