fixed error handling for to small k paramter, added unist test checking new error handling