Fix for #49, afterInitialize needed to be moved after schema creation.