Fix the positioning when the toolbar was displayed too far on the right side