TRN-487a tracked down mistake in implementation. Passing some tests.