fixes to prevent writing to constant
temp fix for haxe git regression