Fix for issue #1004.
Merge pull request #1007 from tommyd3mdi/codecept-issue-1004

Fix for issue #1004.