Merge "Remove the cast and use the override then()" into main