Fixed more nesting issues