CObjectFactory unsafe code fixed. CLevelManager improved