Fixed stuff, slightly works on Linux