fix ommition in last commit
only register action when its needed