Fixed segfault issue and some sprint bugs