after_initialize changed to before_initialize