fix "is not defined" warnings
fix "Missing semicolon" warnings