Fixed code for Issue #32