Merged latest fixes from Master.

Fix for #74. 487f90a02bb0595