refactors spec
adds specs for the bug