cleanup more nesting issues