Implemented @pixelnerve's changes.