final fixes to mac and button functions