'#' operator and exception bugfixes