Bug fixes with gpio output.