Fragment Memory Limit implementation calculates incorrect number of fragments