Fix bug of auto layout