Fixes to #init to stop exceeding stack allocation