bug fixed when no param was supplied.
Added test.