databse close when you save an interval, which it didnt!