Fixed segfault caused by warning resolution