Fixed #728 SQL-based callbacks