Some fixes for the previous merge

Change-Id: Ief5401cc32d805905ce70c3af1f7e6c8bee77a9c