fix bug in center plugin