Fixed lasts known bugs, now should work on haxe 2.x and haxe 3.0