Fixed a bug querying the width of panel windows