patches from florian
dev phone call 28 Jan 2014