Added trap callbacks