fix bug on orphan scope and controller