Fixed cut bug on Webkit browsers

It was a long journey. Verified that it works on a couple of machines. Hope it works on other people's machines too.