fixed a bug that not apply button size in function