Added abandon state/support. Fixed weird type conversion issue.