Fix a bug when the default_height is not the same as titlebar_height