Added 'safe apply' approach to avoid getting 'apply already in progress' errors