IR->SSM: some bug fixes, test added