fixed a few major bugs, more planned