added another check to trigger a rebuild