fixed undefined bug in uploads