Fixed a bug that caused the program to crash when a file was uploaded