Applying the fixes
Fixing the update
removed the redundant code
Merge pull request #4 from jfleener/fixes

Applying the fixes