Fix firebird error function