Fix missing semicolon, remove duplicate variables