fixed hsql bugs