handle after_initialize method properly.