Fix bug, division by 0 and error without storages defined
Merge branch 'master' into devel