Cancel buttons now work accordingly