Fixed wrong swap size calculations

Change-Id: I464981553aa03f112f9ba6a177669bd92f0fe73e
Closes-Bug: #1259486
Merge "Fixed wrong swap size calculations"