Fixed bug with backwards compatibility code.

Change-Id: I1e03270bfa35851bc76562a0951a71e8180b744b