fixed ML segfault