Fixed RGB export issue.
Fixed misc errors.