fixing displaywidth better