bug fix

Making sure there's an & before using the charAt() method