Update center function

Creating a new frame here does not work. You have to change the existing
frame.