Fix bugs with HuskySQL and implement it fully