fixed a bug
added a missing variable to prevent crash

my mod crashes the game if this isn't here
just to be safe
Merge pull request #15 from EnderShadow/master

Fixed a few bugs