Various bugfixes

All related to custom buttons