fixed heaps of errors