Fix vision tool segfault