fix some issues related to widgets' position