fixes for read scandata from sqlite