Fix SQL error in sequence frame