Cleaned up a bit the fix for #2.