fixed error in pins controller