Update class.R

This change will fix issue #4 and http://stackoverflow.com/q/21603660/2161065.