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