Merged #37 and included fixed for issue #39