some fixes localib