properly fix compile errors