fixed templated iterator compilation
added cursor test