error.dp event and minor fixes

fixes for #39, #40, #41