Changed initialization code that is problematic when AOT compiling.