fix code style and rebuild position