[Minor] Move one line of code so that correct program activity is logged