prevented memory leaks