You have 2 places in your code where you have ) character that is not escaped and not quoted, so it is ending your code block prematurely.
You just need to escape the ) characters.
Thanks a lot! That solved my problem

You have 2 places in your code where you have ) character that is not escaped and not quoted, so it is ending your code block prematurely.
You just need to escape the ) characters.