Fix Log & Active record