Fixed signedness to prevent segfault on pin type error checking.