fixed the semicolon logic