Fixed memory issue with large theme images