Standard Deviation function rectified