Removing dead variables in activation