bug fixing for dynamic image loading.