fixes for linux and VS2013