fix for issue #1144

please add a comment explaining this hook. 
as an option you can move it into private method