Added mode check for obvious reasons