Merge pull request #414 from alex/avail-cleanup

Fixed #408 -- cleanup how is_available works