Added fix and integration tests GitHub Issue 25