Fixes for issue 42, wrong types passed in to delegate