removed platform-dependent code, should fix #1