Added ability to programatically enable/disable a flap