Fixed a bug with available states and added a getAvailableStates

Signed-off-by: Frode Marton Meling <fm@saltship.com>