fixed compile warnings in Traps