Some fixes for palete upload