Fixed issues with invalid cell layout