Fix #2: incorrect pointer dereference
Fix code/doc mismatch
Call stop() instead of non-existant error()