Fixed thumbnail generation.
Merge branch 'master' into dev