fixing carousel animation issue