Fix for issue #329 (dynamically enabling / disabling gamma correction)