Merge "Fix calculation of empty spaces" into rvc-dev