Checking now for correct route on putElement

Fixes #583