Fixed bug with buttons when multiple forms are open in a tab