adding unit test for crash bug