Fix action attribute setting
Add type hinting