added some checks for ribbon

Change-Id: I5eb7c676ac85520f4611b21a66acf161030a0bdf