modal.hide is not working changed to modal.hidden