fixed pins controller error in creating pins