fixed bugs for device and improved animation