Fixed bug with merge