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

Change-Id: I26ea56430b2190a99cb5d5f6ed87988a01ad8748