Fixed wrong module state parsing. Fixes #478