Fixes some critical errors and add import track