Correct header 'action' logic

Fixed tests