fixed problems. previouse revision was taken from an old version.