Fixes #315 error when a layer does not exist