Fix syntax errors and package dependency