fixed errors in previous merge