Fix crash bug, Clean documentation