Fix incorrect slot calculation.

Change-Id: I9c22207e4073cb94bf31d6828a72c4d6fdc26c22