BUG compiler warning initialize k, see #897