bug fixes and parallel amin