Fix a calculation issue and a position issue
Update demo