Fixes multimedia issues
Merge pull request #239 from aesedepece/fix-for-null-images

Fixes multimedia issues and cleans code