changed event to afterrender