Fix for issue #162 - onCreated callback not called