small fix/improvment when application didn't close the gpio correctly before