Automatic gear shift control