buttons bug fixing