changes made while testing nullptrexecption, fixed