Fixed some bugs, seems like now everything runs properly with pknots.