* Fixed some bugs.
* Added some additional logging.