Fixed: it was generating a surface when user cancels the operation