Fix nested form bugs