fix bugs that failed to recognize set-property on context and resulted in infinte loop