Better handling for animation