Fixes for Swift support