fixes pin states