Fixing several bugs and adding new test scenarios in advanced sec zone tests