Better fix for issue 5