Fix fatal error in PNG thumbnail creation

Fix cache expiration preference