fixed a bug

when generating ATM...Summary numbers not in line.

also chagned error status