fixed some typos

this pr fixes some typos (comma, semicolon) which leads to wrong variabel scopes