fix crashing issue caused by source handler