Fix Linux bugs.
Fix Linux bugs.

stevenlovegrove/Pangolin,wxdzju/Pangolin,randi120/Pangolin,stevenlovegrove/Pangolin,mp3guy/Pangolin,mp3guy/Pangolin,renzodenardi/Pangolin,arpg/Pangolin,tschmidt23/Pangolin,tschmidt23/Pangolin,stevenlovegrove/Pangolin,renzodenardi/Pangolin,tschmidt23/Pangolin,randi120/Pangolin,mp3guy/Pangolin,wxdzju/Pangolin,arpg/Pangolin