fix an issue with source switching