code change for kibana to make sure modal is loaded first