R format bug fixed