Revert "Revert "Fixed cancel buttons""

This reverts commit be4980b3d541d53161e2feaf39f8309129d4c125.