Fixed Bug: typo error, i char missing on first if statement