fix sql upload