Upload validation bugfix