Fixed error when daemon changes directory: templates are not found