Bug fix for rms test