Fix wrong color when saving as jpg