Fix bugs, catch compile errors