Fix multiple window buttons bug