Hooks&API bugs
Merge branch 'bug-785' into devel
Merge branch 'devel'