destructors were in wrong order -> potential crash