Handling edge case that was not considered in commit 5f5b9f7