Added custom events to show loading content