Probably make removegrain work in linux