animation: fix #1255, from the #1320 pr.