fix compile errors, still have link errros