centered window and possibly fixed a bug when using solver