Fix arguments being used in wrong conditional