fixed some nereus code + misc