fixes bugs from doc