Removed unnecessary return. Fixed bug in tests.