Fixes and linux port