clean up for portability