fix compile errors in debug mode