Alternative solution to issue #4