Make sure that the image name is assigned before appending to the menu.
Make sure there is no white space around url.
Merge typo fix from GitHub.