fixed rgb output bug