serveral fixes