Fixed bug to make test's pass.