Remove redundant nest