Fixed #248, also fixed docs generation error