Work around collision detection issues in swift