fix compiling
sanity check/assert
a more convenient way to initialize managers