Adding changes from dlsniper