fixed major bugs with solver, issue #1 almost complete.