Changed to charAt to fix IE7 Issue