added support for linux + fixes