fixed gpio resource leak