Improved todo button behaviour