Fix some problems but still not functional