Fixed missing library and const cast