Added test and removed impossible code