fix weird nesting and stuff