Fixed minor bug with null scope