fix aWrite declaration error