Merged changes from n9-button-monitor 0.5.2

*NOT TESTED*