avoid null pointer exception if no scope specified