Fix BUG: undefined behaviour for k=33