src: fixed bug regarding onDestroy, implement dao use