Partial fix for issue #41 to get rid of the undefined error.