Serveral fixes