Fix create thumbnail exception to be thrown if no media is found
Merge branch '2.1'