I implemented the example from scratch again and this time accidentally forgot to make directories final and it magically worked. I have been able to confirm removing the final keyword results in the expected result. Good to know
directories
final