fixed crash during testing