fixes for init, and tests