Fixed minus one, added test case