Fix register source problem