Bug fix for case x infinite and k<0