Simplify negative k code