Fix double buffering in AimSAI

This bug is inherited from the original aimc project
and discussed in http://code.google.com/p/aimc/issues/detail?id=4.