Bug fix, Thanks to John Brennan