fixed compile problem and lint warnings