Fixed bug in tests, this version passes tests