Fixed RMS bug