Correctly works with no cancel button.