Fixed Res compile errors.