Fixed crossplatform bug #1