These fixes were queued for v5.18 but due to me changing my scripting they never actually got merged - pulling them up now.