Fix some bug about titlebar layout