fixed segfaults
generated documentation