Small fixes and improvements.

Fixed issue #3