Added getRepeatMode method, bug fixed