Finally working as expected