fix a bug and make 1.5+ compatibile
Merge pull request #1 from jackmcdade/develop

fix a bug and make 1.5+ compatibile