Fix atms receiver bug, and add unittests.