Fix #319 and Fix build.xml

I wanted to submit these separately, but I am new to GitHub.
My SMP world that was crashing on startup is no longer crashing after this fix.