fixed some bug for convert to haxe ready