Fix bug introduced by active record implementation