Fixing other unexpected behaviors for issue #39