found error in test, fixed it and the relevant problem in the code.