fixed error with disconnect and read input one GPIO calls