Fixed bug with incorrect Xl calc