Fix bugs and move compilation of commant-t