Corrected issue #8 and issue #7