Fix #30 where close does not unassign pin