fix for portability