fix bug in new_oscl function