Fix #699 interactive mode problem
Improve interactive source behavior