Fixed error in pin controller