fixed compile errors in debug mode