Fix a syntax error
Apply same fixes from transmission to firefly