fix nil deref and knock assertion failure down to just an error message