Fixed segfault on missing hawkAlgorithm in token, added more tests