some fixing for upload and resize