fix bug in issue #104
properly handle invalid statuses
API update
type fixes