Mac support fixed

For issue #13