Fix for cross-platform functionality

Submitted by: alfred