Commented out onLoading to prevent window leaks