support for Opera browser

My patch for Opera and some minor bugs :)