Merge "Fix calculation of empty spaces" into rvc-dev am: 6813206e6c am: 2248146de8 am: 7b8c083000 am: 662ef38caf

Change-Id: I8dc18f94a512ae0360a716fe3424df87f447a402