Fixes syntax problems

Fix few syntax problems that cause errors when running the entire file.