Bugfixes 20130220

Catching up bugfix branch. This pull should contain only fixes and no new functionality.