Won't work when compiled to a jar...trying to fix?