Quickfix to database functions