Improve Atrac id generating and fix crash.