fixed  exception with insertRule