fixed compilation errors and warnings on builds 3298 and 4384