BUg fixes for last commite