minor improvements (clip_upper and warning)