fix unnecessary nesting