Fixed method for extracting strings
Fixed wrong module state parsing. Fixes #478