fixed issues due to swift beta 5