Fix bug where function calls are not terminated with ";"