Fixed minor bug and trap method.