Merged 2013-02-01 patch from van der Maaten