[#290] Implement fix to #311 from @kindly