Multiple and important fixes