many bugs and theme fixes