Fixed a bug with removeLayoutItemAtIndex