Fixed typo in function opt() causing unknown parametr