Repair function
Merge pull request #1 from Del-S/devel

Repair function