Cross-platform fixes

Plugin should work on Windows and Linux