Fixed minor bug, added new Test.