small fixes

- php warnings removed, when in wp debug mode
- using sprintf for html output in a few lines

my wordpress version: 3.4.2