Restore temporary array setting in method WriteData and fix bug in metho...

Request by Advance Soft