Updated the patch due to review, needs squashed