fix createButton bugs