Fixed the race condition bug when uploading images with smart placement active