removed the crashing code
fixed buggy test