swift3 fixes