fix things in the script API found while using it