Added Lionton's changes