Fix animate function by adding bind