overcoming a very strange arduino bug