Fixed database call to use async