Fix #2206. Added boolean parameter to call the right method.

Change-Id: Ic0bc3be742f28c42d81359fec519f025268c369d