Fixed some issues in gpio control module.