Fixed event handlers

The buttons broke, so I fixed it.