fixed swift bug