fix compile-time errors