Bugfixes for Leo's 2013-10-30 bug list