Fixes the empty file name bug