Fixed issue with wrong images on gallery and double thumbnails. Improved thumbnail creation performance. Other small fixes for 1.0.2.