Corrected an oversight where database changes happened in the on_after_commit hook