Automatically set modes