Another try with Jeffsf's changes