remove activated parameter to avoid creating and deleting layers