fix #341

This has been in docapp for about a month, but not in master.