Fixes shell changing on some platforms