Fixed modal closing if no url