Bug fix attempt for issue #11