Removed duplicate code from a previous merge