Fixed the problem where the maximize/restore button image was not properly changed.