fixed a few minor bugs, still can't find a major bug