Better checking for scope existance

Signed-off-by: Fadion Dashi <jonidashi@gmail.com>