Fix downloading of files over ajax