fix button functions