fixed bug in the previous merge