main fixes