Fixed a bug with the button.
The buttons hould be after not appended.