Fixed some obvious issues in GPIO daemon