added ';' case and more begin fixing

Added ';' case
added begin case in g