We should still add `onBeforeClose` :+1: