fixed error with alpha channel when converting to jpg