Fix bug found by Haytham