fixed issues with the 'active' flag