Fix optional parameters in animate, closes #557