corrects mistake in mac os code, remove useless variable