fixed conversion script bugs