#118 Fixed wrong optimization