Fix database functional.