Fixing crash bug on make check