reconfigure and fix compile errors