fixed lib runtime error