Fixed button hiding issue

Don't know why I must redeclare a.hide. This will require further
analysis
UI implementation