Bug Fixing

Improve stability and the bugs that where reported.