Fixed a bug of as3.