Made some changes to allow iOS building