bug fixed: setting gpio to output