Fixed some auto-complete & return points

Nothing revolutionary, but might help development with IDEs 
this is wrong. It should not always return an error code, but only in case of failure