fixed wrong init from Pin class