Fixed segfault when using multiple layers