Fix exception on rotation.

Change-Id: Ifd8c2a1cd850a68d83f65b5737e33f51ea1a056d
JIRA:CYAN-675