Same bug fix also in loader_db